home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / ds3100.md / gdb / RCS / defs.h,v < prev    next >
Encoding:
Text File  |  1992-07-01  |  18.0 KB  |  748 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     92.06.17.11.48.40;  author secor;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @/* Basic, host-specific, and target-specific definitions for GDB.
  26.    Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
  27.  
  28. This file is part of GDB.
  29.  
  30. This program is free software; you can redistribute it and/or modify
  31. it under the terms of the GNU General Public License as published by
  32. the Free Software Foundation; either version 2 of the License, or
  33. (at your option) any later version.
  34.  
  35. This program is distributed in the hope that it will be useful,
  36. but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  38. GNU General Public License for more details.
  39.  
  40. You should have received a copy of the GNU General Public License
  41. along with this program; if not, write to the Free Software
  42. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  43.  
  44. #if !defined (DEFS_H)
  45. #define DEFS_H 1
  46.  
  47. #include <stdio.h>
  48.  
  49. /* First include ansidecl.h so we can use the various macro definitions
  50.    in all subsequent file inclusions.  FIXME:  This inclusion can now
  51.    be removed from all files that include defs.h */
  52.  
  53. #include "ansidecl.h"
  54.  
  55. /* We could use the EXFUN macro in ansidecl.h to handle prototypes, but
  56.    the name is misleading the the result is ugly.  So just define a simple
  57.    macro to handle the parameter lists. */
  58.  
  59. #ifdef __STDC__
  60. #define PARAMS(paramlist) paramlist
  61. #else
  62. #define PARAMS(paramlist) ()
  63. #endif
  64.  
  65. /* An address in the program being debugged.  Host byte order.  */
  66. typedef unsigned int CORE_ADDR;
  67.  
  68. #define min(a, b) ((a) < (b) ? (a) : (b))
  69. #define max(a, b) ((a) > (b) ? (a) : (b))
  70.  
  71. /* The character C++ uses to build identifiers that must be unique from
  72.    the program's identifiers (such as $this and $$vptr).  */
  73. #define CPLUS_MARKER '$'    /* May be overridden to '.' for SysV */
  74.  
  75. #include <errno.h>        /* System call error return status */
  76.  
  77. extern int quit_flag;
  78. extern int immediate_quit;
  79.  
  80. extern void
  81. quit PARAMS ((void));
  82.  
  83. #define QUIT { if (quit_flag) quit (); }
  84.  
  85. /* Notes on classes: class_alias is for alias commands which are not
  86.    abbreviations of the original command.  */
  87.  
  88. enum command_class
  89. {
  90.   /* Special args to help_list */
  91.   all_classes = -2, all_commands = -1,
  92.   /* Classes of commands */
  93.   no_class = -1, class_run = 0, class_vars, class_stack,
  94.   class_files, class_support, class_info, class_breakpoint,
  95.   class_alias, class_obscure, class_user
  96. };
  97.  
  98. /* the cleanup list records things that have to be undone
  99.    if an error happens (descriptors to be closed, memory to be freed, etc.)
  100.    Each link in the chain records a function to call and an
  101.    argument to give it.
  102.  
  103.    Use make_cleanup to add an element to the cleanup chain.
  104.    Use do_cleanups to do all cleanup actions back to a given
  105.    point in the chain.  Use discard_cleanups to remove cleanups
  106.    from the chain back to a given point, not doing them.  */
  107.  
  108. struct cleanup
  109. {
  110.   struct cleanup *next;
  111.   void (*function) PARAMS ((PTR));
  112.   PTR arg;
  113. };
  114.  
  115. /* From blockframe.c */
  116.  
  117. extern int
  118. inside_entry_func PARAMS ((CORE_ADDR));
  119.  
  120. extern int
  121. inside_entry_file PARAMS ((CORE_ADDR addr));
  122.  
  123. extern int
  124. inside_main_func PARAMS ((CORE_ADDR pc));
  125.  
  126. /* From cplus-dem.c */
  127.  
  128. extern char *
  129. cplus_demangle PARAMS ((const char *, int));
  130.  
  131. extern char *
  132. cplus_mangle_opname PARAMS ((char *, int));
  133.  
  134. /* From libmmalloc.a (memory mapped malloc library) */
  135.  
  136. extern PTR
  137. mmalloc_attach PARAMS ((int, PTR));
  138.  
  139. extern PTR
  140. mmalloc_detach PARAMS ((PTR));
  141.  
  142. extern PTR
  143. mmalloc PARAMS ((PTR, long));
  144.  
  145. extern PTR
  146. mrealloc PARAMS ((PTR, PTR, long));
  147.  
  148. extern void
  149. mfree PARAMS ((PTR, PTR));
  150.  
  151. extern int
  152. mmalloc_setkey PARAMS ((PTR, int, PTR));
  153.  
  154. extern PTR
  155. mmalloc_getkey PARAMS ((PTR, int));
  156.  
  157. /* From utils.c */
  158.  
  159. extern void
  160. init_malloc PARAMS ((PTR));
  161.  
  162. extern void
  163. request_quit PARAMS ((int));
  164.  
  165. extern void
  166. do_cleanups PARAMS ((struct cleanup *));
  167.  
  168. extern void
  169. discard_cleanups PARAMS ((struct cleanup *));
  170.  
  171. /* The bare make_cleanup function is one of those rare beasts that
  172.    takes almost any type of function as the first arg and anything that
  173.    will fit in a "void *" as the second arg.
  174.  
  175.    Should be, once all calls and called-functions are cleaned up:
  176. extern struct cleanup *
  177. make_cleanup PARAMS ((void (*function) (PTR), PTR));
  178.  
  179.    Until then, lint and/or various type-checking compiler options will
  180.    complain about make_cleanup calls.  It'd be wrong to just cast things,
  181.    since the type actually passed when the function is called would be
  182.    wrong.  */
  183.  
  184. extern struct cleanup *
  185. make_cleanup ();
  186.  
  187. extern struct cleanup *
  188. save_cleanups PARAMS ((void));
  189.  
  190. extern void
  191. restore_cleanups PARAMS ((struct cleanup *));
  192.  
  193. extern void
  194. free_current_contents PARAMS ((char **));
  195.  
  196. extern void
  197. null_cleanup PARAMS ((char **));
  198.  
  199. extern int
  200. myread PARAMS ((int, char *, int));
  201.  
  202. extern int
  203. query ();
  204.  
  205. extern void
  206. wrap_here PARAMS ((char *));
  207.  
  208. extern void
  209. reinitialize_more_filter PARAMS ((void));
  210.  
  211. extern int
  212. print_insn PARAMS ((CORE_ADDR, FILE *));
  213.  
  214. extern void
  215. fputs_filtered PARAMS ((const char *, FILE *));
  216.  
  217. extern void
  218. puts_filtered PARAMS ((char *));
  219.  
  220. extern void
  221. fprintf_filtered ();
  222.  
  223. extern void
  224. printf_filtered ();
  225.  
  226. extern void
  227. print_spaces PARAMS ((int, FILE *));
  228.  
  229. extern void
  230. print_spaces_filtered PARAMS ((int, FILE *));
  231.  
  232. extern char *
  233. n_spaces PARAMS ((int));
  234.  
  235. extern void
  236. printchar PARAMS ((int, FILE *, int));
  237.  
  238. extern void
  239. fprint_symbol PARAMS ((FILE *, char *));
  240.  
  241. extern void
  242. fputs_demangled PARAMS ((char *, FILE *, int));
  243.  
  244. extern void
  245. perror_with_name PARAMS ((char *));
  246.  
  247. extern void
  248. print_sys_errmsg PARAMS ((char *, int));
  249.  
  250. /* From regex.c */
  251.  
  252. extern char *
  253. re_comp PARAMS ((char *));
  254.  
  255. /* From symfile.c */
  256.  
  257. extern void
  258. symbol_file_command PARAMS ((char *, int));
  259.  
  260. /* From main.c */
  261.  
  262. extern char *
  263. gdb_readline PARAMS ((char *));
  264.  
  265. extern char *
  266. command_line_input PARAMS ((char *, int));
  267.  
  268. extern void
  269. print_prompt PARAMS ((void));
  270.  
  271. extern int
  272. batch_mode PARAMS ((void));
  273.  
  274. extern int
  275. input_from_terminal_p PARAMS ((void));
  276.  
  277. extern int
  278. catch_errors PARAMS ((int (*) (char *), char *, char *));
  279.  
  280. /* From printcmd.c */
  281.  
  282. extern void
  283. set_next_address PARAMS ((CORE_ADDR));
  284.  
  285. extern void
  286. print_address_symbolic PARAMS ((CORE_ADDR, FILE *, int, char *));
  287.  
  288. extern void
  289. print_address PARAMS ((CORE_ADDR, FILE *));
  290.  
  291. /* From source.c */
  292.  
  293. extern int
  294. openp PARAMS ((char *, int, char *, int, int, char **));
  295.  
  296. extern void
  297. mod_path PARAMS ((char *, char **));
  298.  
  299. extern void
  300. directory_command PARAMS ((char *, int));
  301.  
  302. extern void
  303. init_source_path PARAMS ((void));
  304.  
  305. /* From findvar.c */
  306.  
  307. extern int
  308. read_relative_register_raw_bytes PARAMS ((int, char *));
  309.  
  310. /* From readline (but not in any readline .h files).  */
  311.  
  312. extern char *
  313. tilde_expand PARAMS ((char *));
  314.  
  315. /* Structure for saved commands lines
  316.    (for breakpoints, defined commands, etc).  */
  317.  
  318. struct command_line
  319. {
  320.   struct command_line *next;
  321.   char *line;
  322. };
  323.  
  324. extern struct command_line *
  325. read_command_lines PARAMS ((void));
  326.  
  327. extern void
  328. free_command_lines PARAMS ((struct command_line **));
  329.  
  330. /* String containing the current directory (what getwd would return).  */
  331.  
  332. extern char *current_directory;
  333.  
  334. /* Default radixes for input and output.  Only some values supported.  */
  335. extern unsigned input_radix;
  336. extern unsigned output_radix;
  337.  
  338. /* Baud rate specified for communication with serial target systems.  */
  339. extern char *baud_rate;
  340.  
  341. /* Languages represented in the symbol table and elsewhere. */
  342.  
  343. enum language 
  344. {
  345.    language_unknown,         /* Language not known */
  346.    language_auto,        /* Placeholder for automatic setting */
  347.    language_c,             /* C */
  348.    language_cplus,         /* C++ */
  349.    language_m2            /* Modula-2 */
  350. };
  351.  
  352. /* Return a format string for printf that will print a number in the local
  353.    (language-specific) hexadecimal format.  Result is static and is
  354.    overwritten by the next call.  local_hex_format_custom takes printf
  355.    options like "08" or "l" (to produce e.g. %08x or %lx).  */
  356.  
  357. #define local_hex_format() (current_language->la_hex_format)
  358.  
  359. extern char *
  360. local_hex_format_custom PARAMS ((char *));    /* language.c */
  361.  
  362. /* Return a string that contains a number formatted in the local
  363.    (language-specific) hexadecimal format.  Result is static and is
  364.    overwritten by the next call.  local_hex_string_custom takes printf
  365.    options like "08" or "l".  */
  366.  
  367. extern char *
  368. local_hex_string PARAMS ((int));        /* language.c */
  369.  
  370. extern char *
  371. local_hex_string_custom PARAMS ((int, char *));    /* language.c */
  372.  
  373.  
  374. /* Host machine definition.  This will be a symlink to one of the
  375.    xm-*.h files, built by the `configure' script.  */
  376.  
  377. #include "xm.h"
  378.  
  379. /*
  380.  * Allow things in gdb to be declared "const".  If compiling ANSI, it
  381.  * just works.  If compiling with gcc but non-ansi, redefine to __const__.
  382.  * If non-ansi, non-gcc, then eliminate "const" entirely, making those
  383.  * objects be read-write rather than read-only.
  384.  */
  385.  
  386. #ifndef const
  387. #ifndef __STDC__
  388. # ifdef __GNUC__
  389. #  define const __const__
  390. # else
  391. #  define const /*nothing*/
  392. # endif /* GNUC */
  393. #endif /* STDC */
  394. #endif /* const */
  395.  
  396. #ifndef volatile
  397. #ifndef __STDC__
  398. # ifdef __GNUC__
  399. #  define volatile __volatile__
  400. # else
  401. #  define volatile /*nothing*/
  402. # endif /* GNUC */
  403. #endif /* STDC */
  404. #endif /* volatile */
  405.  
  406. /* Some compilers (many AT&T SVR4 compilers for instance), do not accept
  407.    declarations of functions that never return (exit for instance) as
  408.    "volatile void".  For such compilers "NORETURN" can be defined away
  409.    to keep them happy */
  410.  
  411. #ifndef NORETURN
  412. # define NORETURN volatile
  413. #endif
  414.  
  415. /* Defaults for system-wide constants (if not defined by xm.h, we fake it).  */
  416.  
  417. #if !defined (UINT_MAX)
  418. #define UINT_MAX 0xffffffff
  419. #endif
  420.  
  421. #if !defined (LONG_MAX)
  422. #define LONG_MAX 0x7fffffff
  423. #endif
  424.  
  425. #if !defined (INT_MAX)
  426. #define INT_MAX 0x7fffffff
  427. #endif
  428.  
  429. #if !defined (INT_MIN)
  430. /* Two's complement, 32 bit.  */
  431. #define INT_MIN 0x80000000
  432. #endif
  433.  
  434. /* Number of bits in a char or unsigned char for the target machine.
  435.    Just like CHAR_BIT in <limits.h> but describes the target machine.  */
  436. #if !defined (TARGET_CHAR_BIT)
  437. #define TARGET_CHAR_BIT 8
  438. #endif
  439.  
  440. /* Number of bits in a short or unsigned short for the target machine. */
  441. #if !defined (TARGET_SHORT_BIT)
  442. #define TARGET_SHORT_BIT (sizeof (short) * TARGET_CHAR_BIT)
  443. #endif
  444.  
  445. /* Number of bits in an int or unsigned int for the target machine. */
  446. #if !defined (TARGET_INT_BIT)
  447. #define TARGET_INT_BIT (sizeof (int) * TARGET_CHAR_BIT)
  448. #endif
  449.  
  450. /* Number of bits in a long or unsigned long for the target machine. */
  451. #if !defined (TARGET_LONG_BIT)
  452. #define TARGET_LONG_BIT (sizeof (long) * TARGET_CHAR_BIT)
  453. #endif
  454.  
  455. /* Number of bits in a long long or unsigned long long for the target machine. */
  456. #if !defined (TARGET_LONG_LONG_BIT)
  457. #define TARGET_LONG_LONG_BIT (2 * TARGET_LONG_BIT)
  458. #endif
  459.  
  460. /* Number of bits in a float for the target machine. */
  461. #if !defined (TARGET_FLOAT_BIT)
  462. #define TARGET_FLOAT_BIT (sizeof (float) * TARGET_CHAR_BIT)
  463. #endif
  464.  
  465. /* Number of bits in a double for the target machine. */
  466. #if !defined (TARGET_DOUBLE_BIT)
  467. #define TARGET_DOUBLE_BIT (sizeof (double) * TARGET_CHAR_BIT)
  468. #endif
  469.  
  470. /* Number of bits in a long double for the target machine. */
  471. #if !defined (TARGET_LONG_DOUBLE_BIT)
  472. #define TARGET_LONG_DOUBLE_BIT (2 * TARGET_DOUBLE_BIT)
  473. #endif
  474.  
  475. /* Number of bits in a "complex" for the target machine. */
  476. #if !defined (TARGET_COMPLEX_BIT)
  477. #define TARGET_COMPLEX_BIT (2 * TARGET_FLOAT_BIT)
  478. #endif
  479.  
  480. /* Number of bits in a "double complex" for the target machine. */
  481. #if !defined (TARGET_DOUBLE_COMPLEX_BIT)
  482. #define TARGET_DOUBLE_COMPLEX_BIT (2 * TARGET_DOUBLE_BIT)
  483. #endif
  484.  
  485. /* Number of bits in a pointer for the target machine */
  486. #if !defined (TARGET_PTR_BIT)
  487. #define TARGET_PTR_BIT TARGET_INT_BIT
  488. #endif
  489.  
  490. /* Convert a LONGEST to an int.  This is used in contexts (e.g. number
  491.    of arguments to a function, number in a value history, register
  492.    number, etc.) where the value must not be larger than can fit
  493.    in an int.  */
  494. #if !defined (longest_to_int)
  495. #if defined (LONG_LONG)
  496. #define longest_to_int(x) (((x) > INT_MAX || (x) < INT_MIN) \
  497.                ? error ("Value out of range.") : (int) (x))
  498. #else /* No LONG_LONG.  */
  499. /* Assume sizeof (int) == sizeof (long).  */
  500. #define longest_to_int(x) ((int) (x))
  501. #endif /* No LONG_LONG.  */
  502. #endif /* No longest_to_int.  */
  503.  
  504. /* This should not be a typedef, because "unsigned LONGEST" needs
  505.    to work. LONG_LONG is defined if the host has "long long".  */
  506.  
  507. #ifndef LONGEST
  508. # ifdef LONG_LONG
  509. #  define LONGEST long long
  510. # else
  511. #  define LONGEST long
  512. # endif
  513. #endif
  514.  
  515. /* Assorted functions we can declare, now that const and volatile are 
  516.    defined.  */
  517.  
  518. extern char *
  519. savestring PARAMS ((const char *, int));
  520.  
  521. extern char *
  522. msavestring PARAMS ((void *, const char *, int));
  523.  
  524. extern char *
  525. strsave PARAMS ((const char *));
  526.  
  527. extern char *
  528. mstrsave PARAMS ((void *, const char *));
  529.  
  530. extern char *
  531. concat PARAMS ((char *, ...));
  532.  
  533. extern PTR
  534. xmalloc PARAMS ((long));
  535.  
  536. extern PTR
  537. xrealloc PARAMS ((PTR, long));
  538.  
  539. extern PTR
  540. xmmalloc PARAMS ((PTR, long));
  541.  
  542. extern PTR
  543. xmrealloc PARAMS ((PTR, PTR, long));
  544.  
  545. extern PTR
  546. mmalloc PARAMS ((PTR, long));
  547.  
  548. extern PTR
  549. mrealloc PARAMS ((PTR, PTR, long));
  550.  
  551. extern void
  552. mfree PARAMS ((PTR, PTR));
  553.  
  554. extern int
  555. mmcheck PARAMS ((PTR, void (*) (void)));
  556.  
  557. extern int
  558. mmtrace PARAMS ((void));
  559.  
  560. extern int
  561. parse_escape PARAMS ((char **));
  562.  
  563. extern char *reg_names[];
  564.  
  565. extern NORETURN void            /* Does not return to the caller.  */
  566. error ();
  567.  
  568. extern NORETURN void            /* Does not return to the caller.  */
  569. fatal ();
  570.  
  571. extern NORETURN void            /* Not specified as volatile in ... */
  572. exit PARAMS ((int));            /* 4.10.4.3 */
  573.  
  574. extern NORETURN void            /* Does not return to the caller.  */
  575. nomem PARAMS ((long));
  576.  
  577. extern NORETURN void            /* Does not return to the caller.  */
  578. return_to_top_level PARAMS ((void));
  579.  
  580. extern void
  581. warning_setup PARAMS ((void));
  582.  
  583. extern void
  584. warning ();
  585.  
  586. /* Global functions from other, non-gdb GNU thingies (libiberty for
  587.    instance) */
  588.  
  589. extern char *
  590. basename PARAMS ((char *));
  591.  
  592. extern char *
  593. getenv PARAMS ((CONST char *));
  594.  
  595. extern char **
  596. buildargv PARAMS ((char *));
  597.  
  598. extern void
  599. freeargv PARAMS ((char **));
  600.  
  601. /* For now, we can't include <stdlib.h> because it conflicts with
  602.    "../include/getopt.h".  (FIXME)
  603.  
  604.    However, if a function is defined in the ANSI C standard and a prototype
  605.    for that function is defined and visible in any header file in an ANSI
  606.    conforming environment, then that prototype must match the definition in
  607.    the ANSI standard.  So we can just duplicate them here without conflict,
  608.    since they must be the same in all conforming ANSI environments.  If
  609.    these cause problems, then the environment is not ANSI conformant. */
  610.    
  611. #ifdef __STDC__
  612. #include <stddef.h>
  613. #endif
  614.  
  615. extern int
  616. fclose PARAMS ((FILE *stream));                /* 4.9.5.1 */
  617.  
  618. extern double
  619. atof PARAMS ((const char *nptr));            /* 4.10.1.1 */
  620.  
  621. #ifndef MALLOC_INCOMPATIBLE
  622.  
  623. extern PTR
  624. malloc PARAMS ((size_t size));                          /* 4.10.3.3 */
  625.  
  626. extern PTR
  627. realloc PARAMS ((void *ptr, size_t size));              /* 4.10.3.4 */
  628.  
  629. extern void
  630. free PARAMS ((void *));                    /* 4.10.3.2 */
  631.  
  632. #endif    /* MALLOC_INCOMPATIBLE */
  633.  
  634. extern void
  635. qsort PARAMS ((void *base, size_t nmemb,        /* 4.10.5.2 */
  636.            size_t size,
  637.            int (*comp)(const void *, const void *)));
  638.  
  639. extern char *
  640. strchr PARAMS ((const char *, int));            /* 4.11.5.2 */
  641.  
  642. extern char *
  643. strrchr PARAMS ((const char *, int));            /* 4.11.5.5 */
  644.  
  645. extern char *
  646. strtok PARAMS ((char *, const char *));            /* 4.11.5.8 */
  647.  
  648. extern char *
  649. strerror PARAMS ((int));                /* 4.11.6.2 */
  650.  
  651. /* Various possibilities for alloca.  */
  652. #ifndef alloca
  653. # ifdef __GNUC__
  654. #  define alloca __builtin_alloca
  655. # else
  656. #  ifdef sparc
  657. #   include <alloca.h>
  658. #  endif
  659.    extern char *alloca ();
  660. # endif
  661. #endif
  662.  
  663. /* TARGET_BYTE_ORDER and HOST_BYTE_ORDER should be defined to one of these.  */
  664.  
  665. #if !defined (BIG_ENDIAN)
  666. #define BIG_ENDIAN 4321
  667. #endif
  668.  
  669. #if !defined (LITTLE_ENDIAN)
  670. #define LITTLE_ENDIAN 1234
  671. #endif
  672.  
  673. /* Target-system-dependent parameters for GDB.
  674.  
  675.    The standard thing is to include defs.h.  However, files that are
  676.    specific to a particular target can define TM_FILE_OVERRIDE before
  677.    including defs.h, then can include any particular tm-file they desire.  */
  678.  
  679. /* Target machine definition.  This will be a symlink to one of the
  680.    tm-*.h files, built by the `configure' script.  */
  681.  
  682. #ifndef TM_FILE_OVERRIDE
  683. #include "tm.h"
  684. #endif
  685.  
  686. /* The bit byte-order has to do just with numbering of bits in
  687.    debugging symbols and such.  Conceptually, it's quite separate
  688.    from byte/word byte order.  */
  689.  
  690. #if !defined (BITS_BIG_ENDIAN)
  691. #if TARGET_BYTE_ORDER == BIG_ENDIAN
  692. #define BITS_BIG_ENDIAN 1
  693. #endif /* Big endian.  */
  694.  
  695. #if TARGET_BYTE_ORDER == LITTLE_ENDIAN
  696. #define BITS_BIG_ENDIAN 0
  697. #endif /* Little endian.  */
  698. #endif /* BITS_BIG_ENDIAN not defined.  */
  699.  
  700. /* Swap LEN bytes at BUFFER between target and host byte-order.  */
  701. #if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
  702. #define SWAP_TARGET_AND_HOST(buffer,len)
  703. #else /* Target and host byte order differ.  */
  704. #define SWAP_TARGET_AND_HOST(buffer,len) \
  705.   {                                                                                             \
  706.     char tmp;                                 \
  707.     char *p = (char *)(buffer);                         \
  708.     char *q = ((char *)(buffer)) + len - 1;                    \
  709.     for (; p < q; p++, q--)                          \
  710.       {                                     \
  711.         tmp = *q;                             \
  712.         *q = *p;                             \
  713.         *p = tmp;                             \
  714.       }                                     \
  715.   }
  716. #endif /* Target and host byte order differ.  */
  717.  
  718. /* On some machines there are bits in addresses which are not really
  719.    part of the address, but are used by the kernel, the hardware, etc.
  720.    for special purposes.  ADDR_BITS_REMOVE takes out any such bits
  721.    so we get a "real" address such as one would find in a symbol
  722.    table.  ADDR_BITS_SET sets those bits the way the system wants
  723.    them.  */
  724. #if !defined (ADDR_BITS_REMOVE)
  725. #define ADDR_BITS_REMOVE(addr) (addr)
  726. #define ADDR_BITS_SET(addr) (addr)
  727. #endif /* No ADDR_BITS_REMOVE.  */
  728.  
  729. #if !defined (SYS_SIGLIST_MISSING)
  730. #define SYS_SIGLIST_MISSING defined (USG)
  731. #endif /* No SYS_SIGLIST_MISSING */
  732.  
  733. /* From valops.c */
  734.  
  735. extern CORE_ADDR
  736. push_bytes PARAMS ((CORE_ADDR, char *, int));
  737.  
  738. /* In some modules, we don't have a definition of REGISTER_TYPE yet, so we
  739.    must avoid prototyping this function for now.  FIXME.  Should be:
  740. extern CORE_ADDR
  741. push_word PARAMS ((CORE_ADDR, REGISTER_TYPE));
  742.  */
  743. extern CORE_ADDR
  744. push_word ();
  745.  
  746. #endif /* !defined (DEFS_H) */
  747. @
  748.